<%--
违规统计分析主页面
@author <a href="mailto:chenfenghai@ceopen.cn">chenfenghai</a>
action ：renovateViolationAction
method ：initRenovateViolationStatistic
created ：2010-10-10
--%>
<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/messages.jsp"%>
<%@ include file="/commons/commonEdit.jsp"%>
<%@ include file="/commons/validation.jsp"%>
<%@ include file="/commons/dateTime.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<script type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script type="text/javascript" src="${ctx}/scripts/div/common.js"></script>
<script type="text/javascript" src="${ctx}/scripts/ajaxException.js"></script>
<script type="text/javascript">
	function statisticTypeOnClick(){
		if($("statisticType_category").checked){
			$("statisticType").value = $("statisticType_category").value;
			$("tBurdenDept").style.display = "inline";
			$("tCategory").style.display = "none";
			$("statisticCategoryList").style.display = "inline";
			$("statisticBurdenDeptList").style.display = "none";
		}else{
			$("statisticType").value = $("statisticType_burdenDept").value;
			$("tBurdenDept").style.display = "none";
			$("tCategory").style.display = "inline";
			$("statisticCategoryList").style.display = "none";
			$("statisticBurdenDeptList").style.display = "inline";
		}
	}

	function renovateViolationStatistic(){
		var isTrue=$('statisticForm').fireEvent("onSubmit") ;
	    if(isTrue){
			var action="${ctx}/renovation_renovateViolationAction.do?method=";
			if($("statisticType_category").checked){
				$("statisticForm").action = action + "queryStatisticCategoryList";
				$("statisticForm").target = "statisticCategoryList";
			}else{
				$("statisticForm").action = action + "queryStatisticBurdenDeptList";
				$("statisticForm").target = "statisticBurdenDeptList";
			}
			$("statisticForm").submit();
		}
	}
</script>
</head>
<body>
<div class="pageNav_bg">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td class="window_head_outBg">
		<table border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td><span class="window_head_intext"><img
					src="${ctx}/images/ico_Advance.gif" align="absmiddle" />&nbsp;统计分析</span></td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td class="aux_header_line_1"></td>
	</tr>
	<tr>
		<td class="aux_header_line_2"></td>
	</tr>
</table>
</div>
<div class="container">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td>
		<form id="statisticForm" name="statisticForm" method="post" action=""
			target="" class="required-validate">
		<table border="0" cellpadding="0" cellspacing="1">
			<tr>
				<td class="grid align_right">检查日期：</td>
				<td class="aux_intable_require"><input name="beginCheckDate"
					id="beginCheckDate" type="text"
					class="inputtext required validate-date less-equals-than-endCheckDate"
					validateMessage="输入的开始检查日期必须小于等于结束检查日期"
					afterInsert="beginCheckDateAfter" size="16" maxlength="10">&nbsp;<a
					href="javascript:void(0)"><img name="beginCheckButton"
					src="${ctx}/images/ico_clock.gif" alt="请点选查找日期" border="0"></a> <span
					id="beginCheckDateAfter"></span>至</td>
				<td class="aux_intable_require"><input name="endCheckDate"
					id="endCheckDate" type="text"
					class="inputtext required validate-date great-equals-than-beginCheckDate"
					validateMessage="输入的结束检查日期必须大于等于开始检查日期"
					afterInsert="validateDateAfter" size="16" maxlength="10">&nbsp;<a
					href="javascript:void(0)"><img name="endCheckButton"
					src="${ctx}/images/ico_clock.gif" alt="请点选查找日期" border="0"></a> <span
					id="validateDateAfter"></span></td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td class="grid align_right">楼栋：</td>
				<td class="aux_intable_td2"><pms:unitedSelect name="buildingId"
					optionLabel="name" optionValue="keyword" selectText="请选择"
					dataList="${buildList}" style="width:130px;">
				</pms:unitedSelect></td>
				<td>
				<table id="tBurdenDept" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td class="grid align_left" width="70">责任部门：</td>
						<td class="td_search align_left aux_intable_td2"><pms:unitedSelect
							name="deptId" optionLabel="deptName" optionValue="deptId"
							selectText="请选择" dataList="${burdenDeptList}"
							style="width:110px;" /></td>
					</tr>
				</table>
				<table id="tCategory" style="display: none" border="0"
					cellpadding="0" cellspacing="0">
					<tr>
						<td class="grid align_left" width="70">违规类别：</td>
						<td class="td_search align_left aux_intable_td2"><pms:unitedSelect
							name="categoryId" optionLabel="name" optionValue="keyword"
							selectText="请选择" dataList="${categoryList}" style="width:110px;" /></td>
					</tr>
				</table>
				</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td colspan="2" class="aux_intable_td2">
				<table>
					<tr>
						<td><input type="hidden" id="statisticType"
							name="statisticType" value="1" /> <input type="radio"
							id="statisticType_category" value="1" name="statisticTypeSelect"
							checked="checked" onclick="statisticTypeOnClick()" />按违规类别</td>
						<td></td>
						<td><input type="radio" id="statisticType_burdendept"
							name="statisticTypeSelect" value="2"
							onclick="statisticTypeOnClick()" />按责任部门</td>
					</tr>
				</table>
				</td>
				<td class="td_search">
				<table border="0" cellpadding="0" cellspacing="0"
					onclick="renovateViolationStatistic()">
					<tr>
						<td class="buttonOffLeft" id="btn1_111"></td>
						<td class="buttonOffMiddle" id="btn1_112" onblur="btn_change(11)"
							onMouseOver="btn_change_over(11)" onMouseOut="btn_change_out(11)"><img
							src="${ctx}/images/ico_searchico.gif" alt="" border="0"
							align="absmiddle" /> 统 计</td>
						<td class="buttonOffRight" id="btn1_113"></td>
					</tr>
				</table>
				</td>
				<td>&nbsp;</td>
			</tr>
		</table>
		</form>
		</td>
	</tr>
	<tr>
		<td class="btn_between_space"></td>
	</tr>
	<tr>
		<td valign="top"><iframe
			src="${ctx}/renovation_renovateViolationAction.do?method=initStatisticCategoryList"
			name="statisticCategoryList" id="statisticCategoryList" width="100%"
			height="300px" frameborder="0" scrolling="auto"> </iframe> <iframe
			style="display: none;"
			src="${ctx}/renovation_renovateViolationAction.do?method=initStatisticBurdenDeptList"
			name="statisticBurdenDeptList" id="statisticBurdenDeptList"
			width="100%" height="300px" frameborder="0" scrolling="auto">
		</iframe></td>
	</tr>
</table>
</div>
<script type="text/javascript">
Calendar.setup(
	{
		inputField 		: "beginCheckDate", // ID of the input field
       	ifFormat 		: "%Y-%m-%d", // the date format
       	button 			: "beginCheckButton", // ID of the button
       	align          	: "Tl",           // alignment (defaults to "Bl")
 		singleClick    	: true
	}
);

Calendar.setup(
	{
       	inputField 		: "endCheckDate", // ID of the input field
       	ifFormat 		: "%Y-%m-%d", // the date format
       	button 			: "endCheckButton", // ID of the button
       	align          	: "Tl",           // alignment (defaults to "Bl")
 		singleClick    	: true
	}
);
</script>
</body>
</html>
